using MicroMsg.Network;
using System;
namespace MicroMsg.Scene.Video
{
	public class UploadVideoContextMgr : ContextMgrBase<UploadVideoContext>
	{
		public static UploadVideoContextMgr gContextMgr;
		public static UploadVideoContextMgr getInstance()
		{
			if (UploadVideoContextMgr.gContextMgr == null)
			{
				UploadVideoContextMgr.gContextMgr = new UploadVideoContextMgr();
			}
			return UploadVideoContextMgr.gContextMgr;
		}
		public UploadVideoContext findByClientMsgID(string clientMsgID)
		{
			UploadVideoContext result;
			lock (this.mQueueLock)
			{
				if (this.mContextQueue.isEmpty())
				{
					result = null;
				}
				else
				{
					for (ListNode next = this.mContextQueue._head._next; next != null; next = next._next)
					{
						UploadVideoContext uploadVideoContext = next._obj as UploadVideoContext;
						if (uploadVideoContext != null && uploadVideoContext.mVideoTrans.strClientMsgId.Equals(clientMsgID))
						{
							result = uploadVideoContext;
							return result;
						}
					}
					result = null;
				}
			}
			return result;
		}
	}
}
